<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="__PUBLIC__/admin/sncss/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/sncss/css/combo.select.css" rel="stylesheet" type="text/css" />

</head>

<body>

	<div class="place">
	<span>位置：</span>
	<ul class="placeul">
	<li><a>首页</a></li>
	<li><a>展示音频列表</a></li>
	<li><a>修改自媒体</a></li>
	</ul>
	</div>

	<div class="formbody">
	<div class="formtitle"><span>修改自媒体</span></div>
	  	<form method="post" enctype="multipart/form-data" action="{:U('/Home/Mockaudio/mockeditpost')}" >
			<ul class="forminfo">
				<input type="hidden" name="id" value="{$data.id}">
				<li>
					<label>名称</label>
					<input name="name" type="text" class="dfinput" value="{$data.name}" required="required"/>
				</li>

				<li>
					<label>标签</label>
					<input name="articles" type="text" class="dfinput" value="{$data.articles}" required="required"/>
				</li>

				<li><label>分类</label>
					<select class="dfinput" name="class">
						<foreach name="class" item="v">
				    	  <option value ="{$v.id}" {$v.selected}>{$v.name}</option>
						</foreach>
					</select>
				</li>
				<li>
					<label>简介</label>
					<textarea name="message" required="required"  type="text" class="textinput">{$data.message}</textarea>
				</li>
				<li>
					<div style="width: 86px;line-height: 34px;display: block;float: left;">头像</div>
					<input type="file" style="margin:5px 0 0 0" name="photo" id='file'; onchange="c()">
					<div>
						<img src="{$data.pic}" id='show' style="width:150px;margin: 20px;">
					</div>
				</li>
				<li>
					<label>&nbsp;</label><input name="" type="submit" class="btn" value="确认"/>
				</li>
			</ul>
  		</form>
	</div>
</body>
<script src="__PUBLIC__/js/jquery1.8.3.js"></script>
<script type="text/javascript">
	function c () {
		var r= new FileReader();
		f=document.getElementById('file').files[0];
		r.readAsDataURL(f);
		r.onload=function  (e) {
			document.getElementById('show').src=this.result;
		};
	}
</script>
</html>
